//
//  NetRequest.h
//  CustomHUD
//
//  Created by feiwei on 15/11/23.
//  Copyright © 2015年 feiwei. All rights reserved.
//

#import <Foundation/Foundation.h>
@class XZQProgressHUD;

typedef void(^SuccessBlock)(id data);
typedef void(^FailBlock)(NSString *errorDes);
typedef void(^HideHUDBlock)();
typedef void(^RefreshBlock)();

@interface NetRequest : NSObject

@property (nonatomic,strong)RefreshBlock refreshed;
@property (nonatomic,strong)UIView *contentView;
//get方法的网络请求
+ (void)getDataWithUrlString:(NSString *)urlString withParams:(NSDictionary *)params success:(SuccessBlock)successBlock fail:(FailBlock)failBlock;
//post方法的网络请求
+ (void)postDataWithUrlString:(NSString *)urlString withParams:(NSDictionary *)params success:(SuccessBlock)successBlock fail:(FailBlock)failBlock refresh:(RefreshBlock)refreshBlock;
//带加载框的get方法网络请求
+ (void)getDataWithUrlString:(NSString *)urlString withParams:(NSDictionary *)params isShowHUD:(BOOL)isShow HUD:(XZQProgressHUD *)HUD showNetworkErrorAlert:(BOOL)showAlert success:(SuccessBlock)successBlock fail:(FailBlock)failBlock;
//带加载框的post方法网络请求
+ (void)postDataWithUrlString:(NSString *)urlString withParams:(NSDictionary *)params isShowHUD:(BOOL)isShow HUD:(XZQProgressHUD *)HUD showNetworkErrorAlert:(BOOL)showAlert success:(SuccessBlock)successBlock fail:(FailBlock)failBlock;


@end
